package com.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.common.model.User;
import com.common.query.UserQueryParam;

import java.util.List;

public interface UserService {

    List<User> findAll();

    User findByUserId(long id);

    List<User> findByUsernameLike(String username);

    User findByUsername(String username);

    int save(User user);

    void edit(User user);

    boolean edit(Long id, User user);

    void delete(long id);

    IPage<User> findAll(Integer page, Integer pageSize);

    IPage<User> findAll(
            Integer page,
            Integer pageSize,
            UserQueryParam userQueryParam
    );
}
